import { request, config } from 'utils'

const { api } = config
const {
  exchangeSetAdd,
  exchangeSetAllBrif,
  exchangeSetDel,
  exchangeSetMultiDel,
  exchangeSetEdit,
  exchangeSetGet,
  exchangeSetList,
  exchangeSetListBrif,
} = api

export async function add (params) {
  return request({
    url: exchangeSetAdd,
    method: 'post',
    data: params,
  })
}
export async function allbrif (params) {
  return request({
    url: exchangeSetAllBrif,
    method: 'post',
    data: params,
  })
}
export async function del (params) {
  return request({
    url: exchangeSetDel,
    method: 'delete',
    data: params,
  })
}
export async function delall (params) {
  return request({
    url: exchangeSetMultiDel,
    method: 'delete',
    data: params,
  })
}
export async function edit (params) {
  return request({
    url: exchangeSetEdit,
    method: 'put',
    data: params,
  })
}
export async function get (params) {
  return request({
    url: exchangeSetGet,
    method: 'put',
    data: params,
  })
}
export async function list (params) {
  return request({
    url: exchangeSetList,
    method: 'put',
    data: params,
  })
}
export async function listbrif (params) {
  return request({
    url: exchangeSetListBrif,
    method: 'post',
    data: params,
  })
}
